﻿using System;
using System.Runtime.Serialization;
using System.Security.Permissions;

namespace ContractDriven.Exceptions
{
    [Serializable]
    public class ContractDrivenFrameworkException : Exception
    {
        public ContractDrivenFrameworkException() 
            : base() { }

        public ContractDrivenFrameworkException(string message) 
            : base(message) { }

        public ContractDrivenFrameworkException(string message, Exception innerException) :
            base(message, innerException) { }

        //Note: without this contructor, deserialization will fail.
        [SecurityPermissionAttribute(SecurityAction.Demand, SerializationFormatter=true)]
        protected ContractDrivenFrameworkException(SerializationInfo info, StreamingContext context) 
			: base (info, context)
		{
		}
    }
}
